package cn.xt.service.houselist;

import cn.xt.bean.HouseCondition;
import cn.xt.bean.HouseInfo;
import cn.xt.dao.houselist.HouseListMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ifdestiny
 * @create 2018-11-22 10:57
 */

@Service
public class HouseListService {
    @Autowired
    HouseListMapper houseListMapper;

    /**
     * 房子信息
     * @param houseCondition 房子条件
     * @return
     */
    public List<HouseInfo> getHouseList(HouseCondition houseCondition){
        return houseListMapper.getHouseList(houseCondition);
    }

    /**
     *房子总数
     * @param houseCondition 房子条件
     * @return
     */
    public Integer getHouseCount(HouseCondition houseCondition){
        return houseListMapper.getHouseCount(houseCondition);
    }

    /**
     * 热门房子推荐
     * @return
     */
    public List<HouseInfo> getHouseRecommend(){
        return houseListMapper.getHouseRecommend();
    }

    /**
     * 房子详情信息
     * @param houseId
     * @return
     */
    public HouseInfo getHouseDetail(Integer houseId){
        return houseListMapper.getHouseDetail(houseId);
    }

}
